<h3>链接管理</h3>

<table>
  <tr>
    <th>用户</th>
    <th>网站名</th>
    <th>网址</th>
    <th>图像</th>
    <th>描述</th>
    <th>是否通过</th>
    <th>链接排序</th>
  </tr>

<% for link in @links %>
  <tr>
    <td><%=h link.user.login %></td>
    <td><%=h link.name %></td>
    <td><%=h link.address %></td>
    <td><%= image_tag link.img ? "newsimgs/#{link.img}":"no_images",:size=>"30x30" %></td>
    <td><%=h link.description %></td>
    <td><%=h link.auditing_state %></td>
    <td><%=h link.link_order %></td> 
    <td><%= link_to 'Edit', edit_link_path(link) %></td>
    <td><%= link_to 'Destroy', link, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New link', new_link_path %>
<fieldset class="demo">
  <LEGEND>操作说明：</LEGEND>
  <p>
    新建首页循环图像,*为必填项。
  </p>
  </fieldset>
